WindowInsetsControllerCompat

Provide simple controls of windows that generate insets. For SDKs >= 30, this class is a simple wrapper around WindowInsetsController. For lower SDKs, this class aims to behave as close as possible to the original implementation.

Constructors

Link copied to clipboard
constructor(@NonNull window: Window, @NonNull view: View)

Types

Link copied to clipboard
Listener to be notified when the set of controllable WindowInsetsCompat.Type controlled by a WindowInsetsController changes.

Properties

Link copied to clipboard
The default option for setSystemBarsBehavior: Window would like to remain interactive when hiding navigation bars by calling hide or setInsetsAndAlpha.
Link copied to clipboard
Option for setSystemBarsBehavior: Window would like to remain interactive when hiding navigation bars by calling hide or setInsetsAndAlpha.
Link copied to clipboard
Option for setSystemBarsBehavior: Window would like to remain interactive when hiding navigation bars by calling hide or setInsetsAndAlpha.

Functions

Link copied to clipboard
open fun controlWindowInsetsAnimation(types: Int, durationMillis: Long, @Nullable interpolator: Interpolator, @Nullable cancellationSignal: CancellationSignal, @NonNull listener: WindowInsetsAnimationControlListenerCompat)
Lets the application control window inset animations in a frame-by-frame manner by modifying the position of the windows in the system causing insets directly using setInsetsAndAlpha in the controller provided by the given listener.
Link copied to clipboard
Retrieves the requested behavior of system bars.
Link copied to clipboard
open fun hide(types: Int)
Makes a set of windows causing insets disappear.
Link copied to clipboard
Checks if the foreground of the navigation bar is set to light.
Link copied to clipboard
Checks if the foreground of the status bar is set to light.
Link copied to clipboard
If true, changes the foreground color of the navigation bars to light so that the items on the bar can be read clearly.
Link copied to clipboard
If true, changes the foreground color of the status bars to light so that the items on the bar can be read clearly.
Link copied to clipboard
open fun setSystemBarsBehavior(behavior: Int)
Controls the behavior of system bars.
Link copied to clipboard
open fun show(types: Int)
Makes a set of windows that cause insets appear on screen.